package com.xzy.service.impl;

import com.xzy.entity.mReport;
import com.xzy.mapper.mReportMapper;
import com.xzy.service.mReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class mReportServiceImpl implements mReportService {
    @Autowired
    private mReportMapper  mreportMapper;

    @Override
    public void addmReport(mReport mreport) {
        mreportMapper.addmReport(mreport);
    }

    @Override
    public mReport getmReportByName(String mreportName, int mreportDate) {
        return mreportMapper.getmReportByName(mreportName,mreportDate);
    }

    @Override
    public List<mReport> getmReportByDate(int reportDate) {
        return mreportMapper.getmReportByDate(reportDate);
    }

    @Override
    public mReport getmReport(int mreportId) {
        return mreportMapper.getmReport(mreportId);
    }

    @Override
    public List<mReport> getmReportByDepart(int departmentId) {
        return mreportMapper.getmReportByDepart(departmentId);
    }

    @Override
    public void deletemReport(int mreportId) {
        mreportMapper.deletemReport(mreportId);
    }

    @Override
    public void updatemReport(mReport mreport) {
      mreportMapper.updatemReport(mreport);
    }

    @Override
    public List<mReport> getAllmReport() {
        return mreportMapper.getAllmReport();
    }

    @Override
    public mReport getmReportByDepartmentAndDate(int departmentId, int mreportDate) {
        return mreportMapper.getmReportByDepartmentAndDate(departmentId,mreportDate);
    }

    @Override
    public List<Integer> getDepartments(int mreportDate) {
        return mreportMapper.getDepartments(mreportDate);
    }
}
